Optimal. Leaf size=162 \[ -\frac {2 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b d \sqrt {a+b \cos (c+d x)}}+\frac {2 \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}+\frac {2 a \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2753, 2752, 2663, 2661, 2655, 2653} \[ -\frac {2 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b d \sqrt {a+b \cos (c+d x)}}+\frac {2 \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{3 d}+\frac {2 a \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 2753
Rubi steps
\begin {align*} \int \cos (c+d x) \sqrt {a+b \cos (c+d x)} \, dx &=\frac {2 \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 d}+\frac {2}{3} \int \frac {\frac {b}{2}+\frac {1}{2} a \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx\\ &=\frac {2 \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 d}+\frac {a \int \sqrt {a+b \cos (c+d x)} \, dx}{3 b}-\frac {\left (a^2-b^2\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{3 b}\\ &=\frac {2 \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 d}+\frac {\left (a \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{3 b \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (\left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{3 b \sqrt {a+b \cos (c+d x)}}\\ &=\frac {2 a \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b d \sqrt {a+b \cos (c+d x)}}+\frac {2 \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.55, size = 137, normalized size = 0.85 \[ \frac {-2 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )+2 b \sin (c+d x) (a+b \cos (c+d x))+2 a (a+b) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b d \sqrt {a+b \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.87, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\sqrt {b \cos \left (d x + c\right ) + a} \cos \left (d x + c\right ), x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \cos \left (d x + c\right ) + a} \cos \left (d x + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.74, size = 452, normalized size = 2.79 \[ -\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (4 \left (\cos ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}+2 \left (\cos ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -6 \left (\cos ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}-\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a^{2}+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) b^{2}+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a^{2}-\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a -b}{a -b}}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a b -2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a b +2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) b^{2}\right )}{3 b \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +\left (a +b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a +b}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \cos \left (d x + c\right ) + a} \cos \left (d x + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \cos \left (c+d\,x\right )\,\sqrt {a+b\,\cos \left (c+d\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \cos {\left (c + d x \right )}} \cos {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________